home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / pcl / src-16f.lha / ldb / globals.c < prev    next >
C/C++ Source or Header  |  1991-11-06  |  1KB  |  67 lines

  1. /* $Header: globals.c,v 1.9 91/10/22 19:20:34 wlott Exp $ */
  2.  
  3. /* Variables everybody needs to look at or frob on. */
  4.  
  5. #include <stdio.h>
  6.  
  7. #include "lisp.h"
  8. #include "ldb.h"
  9. #include "globals.h"
  10.  
  11. char *number_stack_start;
  12.  
  13. int foreign_function_call_active;
  14.  
  15. #ifdef mips
  16. unsigned long saved_global_pointer;
  17. unsigned long current_flags_register;
  18. #endif
  19.  
  20. lispobj *current_control_stack_pointer;
  21. lispobj *current_control_frame_pointer;
  22. #ifndef ibmrt
  23. lispobj *current_binding_stack_pointer;
  24. #endif
  25.  
  26. lispobj *read_only_space;
  27. lispobj *static_space;
  28. lispobj *dynamic_0_space;
  29. lispobj *dynamic_1_space;
  30. lispobj *control_stack;
  31. lispobj *binding_stack;
  32.  
  33. lispobj *current_dynamic_space;
  34. #ifndef ibmrt
  35. lispobj *current_dynamic_space_free_pointer;
  36. lispobj *current_auto_gc_trigger;
  37. #endif
  38.  
  39. globals_init()
  40. {
  41.     /* Space, stack, and free pointer vars are initialized by
  42.        validate() and coreparse(). */
  43.  
  44. #ifdef mips
  45.     /* Get the current value of GP. */
  46.     saved_global_pointer = current_global_pointer();
  47.  
  48.         /* Set the Atomic flag */
  49.     current_flags_register = 1<<flag_Atomic;
  50. #endif
  51. #ifndef ibmrt
  52.  
  53.         /* No GC trigger yet */
  54.         current_auto_gc_trigger = NULL;
  55. #endif
  56.  
  57.     /* Set foreign function call active. */
  58.     foreign_function_call_active = 1;
  59.  
  60.     /* Initialize the current lisp state. */
  61.     current_control_stack_pointer = control_stack;
  62.     current_control_frame_pointer = (lispobj *)0;
  63. #ifndef ibmrt
  64.     current_binding_stack_pointer = binding_stack;
  65. #endif
  66. }
  67.